home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part2 / 13357 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.3 KB

  1. Path: rudi.HL.Siemens.DE!newsadm
  2. From: Fister Manfred <fister@vihp03.vi.hl.siemens.de>
  3. Newsgroups: comp.lang.c++
  4. Subject: CAsyncSocket and VisualBasic
  5. Date: 25 Mar 1996 10:00:19 GMT
  6. Organization: Siemens AG, Munich
  7. Message-ID: <4j5qrj$8fq@rudi>
  8. NNTP-Posting-Host: vifist.vi.hl.siemens.de
  9. Mime-Version: 1.0
  10. Content-Type: text/plain; charset=us-ascii
  11. Content-Transfer-Encoding: 7bit
  12. X-Mailer: Mozilla 1.22 (Windows; I; 16bit)
  13.  
  14. Hi,
  15. I've some problem with the CAsyncSocket class in Visual C++ 4.0 running
  16. under Windows NT. I've programmed a DLL, which uses these socket calls. 
  17. Project setting for this DLL is "a regular DLL with MFC linked 
  18. dynamically". 
  19. When I start a MFC Application, which uses this DLL , everything works 
  20. fine.
  21. If the application is written with Visual Basic 4.0, the socket
  22. creation function (pSocket->Create()) in this DLL fails.
  23.  
  24. I always get the message: Assertion failed in afxwin1.inl at line 19.
  25. In this line, the call AfxGetInstanceHandle() fails. It will be called
  26. from the module \MSDEV\MFC\src\SOCKCORE.CPP in line 611:
  27.  
  28.             if (!pWnd->CreateEx(0, AfxRegisterWndClass(0),
  29.                 _T("Socket Notification Sink"),
  30.                 WS_OVERLAPPED, 0, 0, 0, 0, NULL, NULL))
  31.             {
  32.                 TRACE0("Warning: unable to create socket 
  33. notify window!\n");
  34.                 AfxThrowResourceException();
  35.             }
  36.  
  37. Does anyone know what's the cause and what to do? Thank's a lot ahead!
  38.  
  39. Manfred
  40.  
  41.  
  42.  
  43.